package jacker.bit.price;

import org.json.JSONObject;

import android.content.Context;

public class PlatformBtce implements Platform {

	@Override
	public String getCode() {
		return "btce";
	}

	@Override
	public String getName(Context ctx) {
		return "BTC-E";
	}

	@Override
	public float getPrice() throws Exception{
		String result = PriceChecker.httpGet("https://btc-e.com/api/2/btc_usd/ticker");
		JSONObject json = new JSONObject(result);
		return Float.parseFloat(json.getJSONObject("ticker").getString("last"));
	}

	@Override
	public String getCurrency() {
		// TODO Auto-generated method stub
		return "$";
	}
	
	

}
